<template>
  <div>
    <template>
      <div class="dashboard-container">
        <div class="app-container">
          <!-- 靠右的按钮 -->
          <page-tools>
            <template v-slot:after>
              <el-button type="primary" size="small">添加权限</el-button>
            </template>
          </page-tools>
          <!-- 表格 -->
          <el-table border :data="permList">
            <el-table-column prop="name" align="center" label="名称" />
            <el-table-column prop="code" align="center" label="标识" />
            <el-table-column prop="description" align="center" label="描述" />
            <el-table-column align="center" label="操作">
              <template>
                <el-button type="text">添加</el-button>
                <el-button type="text">编辑</el-button>
                <el-button type="text">删除</el-button>
              </template>
            </el-table-column>

          </el-table>
        </div>
      </div>
    </template>
  </div>
</template>

<script>
import { getPermList } from '@/api/permission'
export default {
  data() {
    return {
      permList: []
    }
  },
  created() {
    this.getPermList()
  },
  methods: {
    async  getPermList() {
      this.permList = await getPermList()
      console.log(this.permList)
    }
  }
}
</script>

<style>

</style>
